home *** CD-ROM | disk | FTP | other *** search
/ Borland JBuilder 6 / jbuilder6.iso / Documents / JAVA Programming / examples / 07 / TwoPoints.java < prev    next >
Encoding:
Java Source  |  2000-09-08  |  271 b   |  12 lines

  1. class TwoPoints {
  2. public static void main(String args[]) { 
  3. Point p1 = new Point();
  4. Point p2 = new Point();
  5. p1.x = 10;
  6. p1.y = 20;
  7. p2.x = 42;
  8. p2.y = 99;
  9. System.out.println("x = " + p1.x + " y = " + p1.y);
  10. System.out.println("x = " + p2.x + " y = " + p2.y);
  11. } }
  12.